home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 October / Gamestar_77_2005-10_dvd.iso / Dema / betonsoldier_spdemo.exe / {app} / Shaders / mesh_null.fx < prev    next >
Encoding:
Text File  |  2005-05-05  |  4.4 KB  |  125 lines

  1. //------------------------------------------------------------------------------------------------------
  2. //------------------------------------------------------------------------------------------------------
  3. //------------------------------------------------------------------------------------------------------
  4.  
  5. #include "shared.fx"
  6. #include "lighting.fx"
  7. #include "fog.fx"
  8.  
  9. //------------------------------------------------------------------------------------------------------
  10. //------------------------------------------------------------------------------------------------------
  11. //------------------------------------------------------------------------------------------------------
  12.  
  13. struct    CVertexShaderInput
  14. {
  15.     float4    Position    :    POSITION;
  16. };
  17.  
  18. //------------------------------------------------------------------------------------------------------
  19.  
  20. struct    CVertexShaderOutput
  21. {
  22.     float4    Position            :    POSITION;
  23. };
  24.  
  25. //------------------------------------------------------------------------------------------------------
  26. //------------------------------------------------------------------------------------------------------
  27. //------------------------------------------------------------------------------------------------------
  28.  
  29. CVertexShaderOutput    Null_Material    (const CVertexShaderInput input);
  30.  
  31. //------------------------------------------------------------------------------------------------------
  32. //------------------------------------------------------------------------------------------------------
  33. //------------------------------------------------------------------------------------------------------
  34.  
  35. CVertexShaderOutput    Null_Material (const CVertexShaderInput input)
  36. {
  37.     CVertexShaderOutput output;
  38.     
  39.     // output position into world+view+projection space
  40.     output.Position = mul (input.Position,WorldCameraProjection);
  41.         
  42.     return output;
  43. }
  44.  
  45. //------------------------------------------------------------------------------------------------------
  46. //------------------------------------------------------------------------------------------------------
  47. //------------------------------------------------------------------------------------------------------
  48.  
  49.  
  50. technique    tech1
  51. <
  52.     int TechniqueIndex = 0;
  53.     int DeviceType = HWSHADER_ONLY;
  54.     int LightingType = INTEGRATED_LIGHTING;
  55.     string RenderingType = "Standard";
  56. >
  57. {
  58.     pass pass1
  59.     {
  60.         TextureFactor        = <SpecularColor>;
  61.         CullMode            = CW;
  62.         ZEnable                = true;
  63.         ZFunc                = ALWAYS;
  64.         ZWriteEnable        = false;
  65.         AlphaBlendEnable    = true;
  66.         SrcBlend            = SRCALPHA;
  67.         DestBlend            = INVSRCALPHA;
  68.         ColorArg1[0]        = TFACTOR;
  69.         ColorOp[0]            = SELECTARG1;
  70.         AlphaArg1[0]        = TFACTOR;
  71.         AlphaOp[0]            = SELECTARG1;
  72.                 
  73.         VertexShader = compile vs_1_1 Null_Material();
  74.         
  75.         PixelShader = NULL;
  76.     }
  77. }
  78.  
  79. //------------------------------------------------------------------------------------------------------
  80. //------------------------------------------------------------------------------------------------------
  81. //------------------------------------------------------------------------------------------------------
  82.  
  83. technique    tech2_TnL
  84. <
  85.     int TechniqueIndex = 0;
  86.     int DeviceType = TNL_ONLY;
  87.     int LightingType = INTEGRATED_LIGHTING;
  88.     string RenderingType = "Standard";
  89. >
  90. {
  91.     pass pass1
  92.     {
  93.         WorldTransform[0]    = <WorldCameraProjection>;
  94.         IndexedVertexBlendEnable = false;
  95.         
  96.         ColorArg1[0]        = DIFFUSE;
  97.         ColorOp[0]        = SELECTARG1;
  98.         AlphaArg1[0]        = DIFFUSE;
  99.         AlphaOp[0]        = SELECTARG1;
  100.         ColorOp[1]        = DISABLE;
  101.         AlphaOp[1]        = DISABLE;
  102.                 
  103.         CullMode        = CW;
  104.         ZEnable            = true;
  105.         ZFunc            = ALWAYS;
  106.         ZWriteEnable        = false;
  107.         AlphaBlendEnable    = true;
  108.         SrcBlend        = SRCALPHA;
  109.         DestBlend        = INVSRCALPHA;
  110.                 
  111.         VertexShader         = NULL;        
  112.         PixelShader         = NULL;
  113.     }
  114. }
  115.  
  116. //------------------------------------------------------------------------------------------------------
  117. //------------------------------------------------------------------------------------------------------
  118. //------------------------------------------------------------------------------------------------------
  119.  
  120. #include "mesh_shadow.fx"
  121. #include "mesh_shadow_projector.fx"
  122.  
  123. //------------------------------------------------------------------------------------------------------
  124. //------------------------------------------------------------------------------------------------------
  125. //------------------------------------------------------------------------------------------------------